<!---
 *
 * Hauxsoft Code Generate @ 2018-12-05 10:14:09
 * Copyright © 2018 Haux Soft Incorporated. All rights reserved. 
 *
-->
<div ng-controller="javaRuleListController">
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li class="active">动态规则</li>
    </ol>
    <hui-query>
        <hui-query-search class="form-horizontal">
            <div class="form-group">
                <label class="text-right control-label col-sm-1">目标系统</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" ng-model="params.target" />
                </div>
                <label class="text-right control-label col-sm-1">所属分组</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" ng-model="params.groupName" />
                </div>
                <label class="text-right control-label col-sm-1">Java类名</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" ng-model="params.simpleClassName" />
                </div>
                <!-- <label class="text-right control-label col-sm-1">状态</label>
                <div class="col-sm-4">
                    <label class="radio-inline" >
                        <input type="radio" ng-model="params.status" name="status"/>
                        全部
                    </label>
                    <label class="radio-inline" ng-repeat="o in status">
                        <input type="radio" ng-model="params.status" name="status" value="{{o.value}}"/>
                        {{o.text}}
                    </label>
                </div> -->
            </div>
            <div class="form-group">
                <label class="text-right control-label col-sm-1">规则名称</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" ng-model="params.name" />
                </div>
                <label class="text-right control-label col-sm-1">状态</label>
                <div class="col-sm-2">
                    <label class="radio-inline" >
                        <input type="radio" ng-model="params.status" name="status"/>
                        全部
                    </label>
                    <label class="radio-inline">
                        <input type="radio" ng-model="params.status" name="status" value="1"/>
                        启用
                    </label>
                    <label class="radio-inline">
                        <input type="radio" ng-model="params.status" name="status" value="0"/>
                        禁用
                    </label>
                </div>
                <button type="button" class="btn btn-primary" ng-click="query($event)">
                    <i class="fa fa-search"></i>
                    搜索
                </button>
            </div>
        </hui-query-search>
        
        <hui-query-head>
    		<div class="row">
                <div class="col-lg-8">
                    <h4>
                        动态规则
                        <small>共找到
                            <span>{{pageData.totalElements}}</span>
                            条数据
                        </small>    
                    </h4>
                </div>
                <div class="col-lg-4 text-right">
                	<button type="button" ui-sref="app.java-rule-add" class="btn btn-primary">
                        <i class="fa fa-plus-circle"></i>
                        新增
                    </button>
                </div>
            </div>
    	</hui-query-head>

        <hui-query-list>
            <table class="table table-striped">
                <thead ng-if="pageData.totalElements" class="thead-inverse">
                    <tr>
                        <th class="col-no">#</th>
                        <th class="col-target">目标系统</th>
                        <th class="col-groupName">所属分组</th>
                        <th class="col-simpleClassName">Java类名</th>
                        <th class="col-name">规则名称</th>
                        <th class="col-name">执行优先级</th>
                        <th class="col-createTime">创建时间</th>
                        <th class="col-status">状态</th>
                        <th class="col-operate">
                            <i class="fa fa-gear"></i>
                        </th>
                    </tr>
                </thead>
                <tbody ng-if="pageData.totalElements">
                    <tr ng-repeat="row in pageData.content">
                        <td class="col-no">
                            {{$index + 1}}
                        </td>
                        <td class="col-target">
                            {{row.target}}                                
                        </td>
                        <td class="col-fileName">
                            {{row.groupName}}                                
                        </td>
                        <td class="col-simpleClassName">
                            {{row.simpleClassName}}                                
                        </td>
                        <td class="col-fullClassName">
                            {{row.name}}                                
                        </td>
                        <td class="col-fullClassName">
                            {{row.sort}}                                
                        </td>
                        <td class="col-createTime">
                            {{row.createTime}}                                
                        </td>
                        <td class="col-status">
                            {{$util.decode(row.status, 1, '启用', 0, '停用', row.status)}}                              
                        </td>
                        <td nowrap="nowrap">
                            <a herf="" ng-click="enable(row)" ng-if="row.status == 0">
                                启用
                            </a>
                            
                            <a herf="" ng-click="disable(row)" ng-if="row.status == 1">
                                停用
                            </a>
                            
                            <a ui-sref="app.java-rule-edit(row)">
                                修改
                            </a>

                            <a herf="" ng-click="remove(row)">
                                删除
                            </a>
                            
                            <!-- <a herf="" ng-click="submit(row)" ng-if="row.status == -1">
                                提交
                            </a> -->
                            
                            <!-- <a herf="" ng-click="widthdraw(row)" ng-if="row.status == 0">
                                撤回
                            </a> -->
                        </td>
                    </tr>
                </tbody>
            </table>
        </hui-query-list>
    </hui-query>
</div>